<template>

    <tr>
      <td><input type="checkbox" v-model="obj.checked"/></td>

      <td>{{obj.name}}</td>
      <td>{{obj.price}}</td>
      <td><button @click="obj.num>0?obj.num--:0">-</button> {{obj.num}} <button @click="obj.num++">+</button> </td>
      <td>{{obj.price*obj.num}}</td>
      <td><button @click="deletefn">删除</button></td>
    </tr>

</template>

<script>
export default {
  props: ['obj'],
  methods: {
    deletefn () {
      this.$emit('deleteshop')
    }
  }
}
</script>

<style >
  td {
    width: 50px;
    padding: 0;
    text-align: center;
  }
  input {
    width: 50px
    /* margin: 0; */
    /* margin-left: 0; */

  }
</style>
